import { IsNotEmpty, Validate } from 'class-validator'
import { isExistRule } from 'src/common/rules/is-exists.rules'
import { isNotExistRule } from 'src/common/rules/is-not-exists.rules'

export class LoginrDto{
    @IsNotEmpty({message:'用户名不能为空'})
    // @isNotExistRule('user',{message:'用户名不能重复'})
    @isExistRule('user',{message:'账号不存在'})
    name:string
    @IsNotEmpty({message:'密码不能为空'})
    password:string

}